package com.travel.server.manager.impl.controller;

import com.travel.server.manager.api.IArticleService;
import com.travel.server.manager.dto.request.EmptyRequest;
import com.travel.server.manager.dto.request.article.*;
import com.travel.server.manager.dto.request.article.data.ExportArticleDataRequest;
import com.travel.server.manager.dto.request.article.data.QueryArticleDataRequest;
import com.travel.server.manager.dto.request.article.data.QuerySingleArticleDataRequest;
import com.travel.server.manager.impl.controller.base.AbstractController;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: LiZhenhui
 * @Date: 2018/12/20 14:35
 * @Desc:
 */
@RestController
public class ArticleController extends AbstractController implements IArticleService {
    @Override
    public Object queryArticleList(@RequestBody QueryArticleListRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryArticleDetail(@RequestBody QueryArticleDetailRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object updateArticle(@RequestBody UpdateArticleRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object deleteArticle(@RequestBody DeleteArticleRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryArticleClassList(@RequestBody QueryArticleClassListRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object updateArticleClass(@RequestBody UpdateArticleClassRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object deleteArticleClass(@RequestBody DeleteArticleClassRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryArticleData(@RequestBody QueryArticleDataRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object exportArticleData(@RequestBody ExportArticleDataRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object querySingleArticleData(@RequestBody QuerySingleArticleDataRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryArticleClassEnum(@RequestBody EmptyRequest request) {
        return this.getCommand().handle(request);
    }
}
